<?php

    // calling the header.php
    get_header();

    // action hook for placing content above #container
    thematic_abovecontainer();

?>
  <div id="category-content" class="grid_10">
    <div id="category-title">
      <img src="<?php bloginfo('template_directory'); ?>/images/butterfly.png" />
      <h2><?php echo single_cat_title( '', false ); ?></h2>
    </div>


    <div class="galleries grid_10">
    <?php
    if(have_posts()){

      $id = getCurrentCatID();
      $c_parent = get_cat_name($id);
      $all_posts = get_posts(array('category' => $id, 'numberposts' => 20));

      foreach($all_posts as $post){
        $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
    ?>
    <div class="grid_2 last">
      <a href="<?php echo get_permalink($post->ID); ?>">
        <img src="<?php echo $feat_image; ?>" />
        <p><?php echo $post->post_title ?></p>
      </a>
    </div>
    <?php }} ?>
    </div>
  </div>

<?php

    // action hook for placing content below #container
    thematic_belowcontainer();

    // calling footer.php
    get_footer();

?>
